#ifndef PRODUCT
#define PRODUCT

/* Product
*************************************************************************************
*
*   Stores product information for a product. Can be compared to other products for
*	equality.
*
*************************************************************************************
*
*   Credits
*
*		Richard Rios
*		Aaron Solomon
*
*************************************************************************************/

class Product {
	/*************************************************************************************
	*
	*	Fields
	*/
	private:
		const static int MAX_PRODUCT_NUMBER = 99999;
		const static int MIN_PRODUCT_NUMBER = 10000;
		const static int DESCRIPTION_LENGTH = 12;
		const static char TAXABLE			= 'T';
		const static char NO_TAXABLE		= 'N';

		int productNumber;						//product id
		char description[DESCRIPTION_LENGTH];	//description of product
		float price;							//price of product
		bool isTaxable;							//is product taxable?

	public:
		static const int INVALID_PRODUCT_INFO = 1;
	/*
	*************************************************************************************
	*
	*	Constructors
	*/
		Product(const char* productInfo);
		/*
		*
		*   Description
		*   -----------------------
		*
		*		Converts a line of productInfo into a product. If the line contains invalid information, it
		*		will throw an error.
		*
		*   Takes
		*   -----------------------
		*
		*		char* productInfo
		*			-	<5 digit int> <1-12 chars, no spaces> <float> <'T'|'N'>
		*
		*   Returns
		*   -----------------------
		*
		*       Initialized Inventory
		*
		*/
	/*
	*************************************************************************************
	*
	*	Properties
	*
	*		Setters
	*/
			/* none */
	/*
	**************************************************************************************
	*
	*		Getters
	*/
		int getProductNumber();
		char* getDescription();
		float getPrice();
		bool getIsTaxable();
	/*
	*************************************************************************************
	*
	*	Methods
	*/
	private:
		void initializeProductNumber(int& position, const char* productInfo);
		void initializeDescription(int& position, const char* productInfo);
		void initializePrice(int& position, const char* productInfo);
		void initializeIsTaxable(int& position, const char* productInfo);
		void filterWhiteSpace(int& position, const char* productInfo);
	/*
	*************************************************************************************/
}; //class Product

#endif